<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0"><meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<title>Welcome to Design Zone......</title>
		<link rel="stylesheet" type="text/css"
			href="../../scripts/ext/resources/css/ext-all.css" />
		<link rel="stylesheet" type="text/css"
			href="../../scripts/ext/resources/css/file-upload.css" />
		<link rel="stylesheet" type="text/css" href="../../styles/dzbase.css" />
		<script type="text/javascript" src="../../scripts/ext/adapter/ext-base.js"></script>
		<script type="text/javascript" src="../../scripts/ext/ext-all.js"></script>
		<script type="text/javascript" src="../../scripts/menu/EditableItem.js"></script>
		<script type="text/javascript" src="../../scripts/menu/RangeMenu.js"></script>
		<script type="text/javascript" src="../../scripts/grid/GridFilters.js"></script>
		<script type="text/javascript" src="../../scripts/grid/filter/Filter.js"></script>
		<script type="text/javascript" src="../../scripts/grid/filter/StringFilter.js"></script>
		<script type="text/javascript" src="../../scripts/grid/filter/ListFilter.js"></script>
		<script type="text/javascript" src="../../scripts/grid/filter/DateFilter.js"></script>
		<script type="text/javascript" src="../../scripts/grid/RowExpander.js"></script>
		<script type="text/javascript" src="../../scripts/form/FileUploadField.js"></script>
		<script type="text/javascript" src="../../scripts/i18nMessage.js"></script>
		<script type="text/javascript" src="../../scripts/utils.js"></script>
		<script type="text/javascript" src="../../scripts/selectMeasureSpecification.js"></script>
		<script type="text/javascript" src="../../scripts/multiSelectProductIdentification.js"></script>
		<script type="text/javascript" src="../../scripts/selectBiFactory.js"></script>
		<script type="text/javascript" src="../../scripts/selectBiFranceCustomer.js"></script>
		<script type="text/javascript" src="../../scripts/selectBiArmor.js"></script>
        <script type="text/javascript" src="../../scripts/selectProductIdentification.js"></script>
        <script type="text/javascript" src="../../scripts/imageViewer.js"></script>
		<script type="text/javascript">
            var piMessage = new i18nMessage('../../servlet/I18nMessageServlet?keyPrefix=ui.productidentification');
			var referenceMessage = new i18nMessage('../../servlet/I18nMessageServlet?keyPrefix=ui.reference');
			var yarnMessage = new i18nMessage('../../servlet/I18nMessageServlet?keyPrefix=ui.yarn');
			var fcMessage = new i18nMessage('../../servlet/I18nMessageServlet?keyPrefix=ui.francecustomer');
			var fMessage = new i18nMessage('../../servlet/I18nMessageServlet?keyPrefix=ui.factory');
            var message = new i18nMessage('../../servlet/I18nMessageServlet?keyPrefix=message');
			
			var idValue = getPrarmeterValue(window.location, 'id');
            var startPage = getPrarmeterValue(window.location, 'startPage');
            var input = getPrarmeterValue(window.location, 'input');
			var ctVersionBefore = getPrarmeterValue(window.location, 'version');
            
            var ctDesignTypeLoader = new xmlLoader('../../servlet/CodeTableServlet?name=CtDesignType');
            var ctCostumeCategoryXmlLoader = new xmlLoader('../../servlet/CodeTableServlet?name=CtCostumeCategory');
            var ctMachineTypeXmlLoader = new xmlLoader('../../servlet/CodeTableServlet?name=CtMachineType');
            var ctCollarTypeXmlLoader = new xmlLoader('../../servlet/CodeTableServlet?name=CtCollarType');
            var ctProductIdentificationStyleLoader = new xmlLoader('../../servlet/CodeTableServlet?name=CtProductIdentificationStyle');
			var ctVersionLoader = new xmlLoader('../../servlet/CodeTableServlet?name=CtVersion');
			var ctSeasonNumberLoader = new xmlLoader('../../servlet/CodeTableServlet?name=CtSeasonNumber');
			var ctProductFamilyLoader = new xmlLoader('../../servlet/CodeTableServlet?name=CtProductFamily');
            
            var ctDesignTypeStore;
            var ctCostumeCategoryStore;
            var ctMachineTypeStore;
            var ctCollarTypeStore;
			var ctVersionStore;
			var ctSeasonNumberStore;
			var ctProductFamilyStore;
			var ctProductIdentificationStyleStore;
            
            var customerCombo;
            var ctDesignTypeCombo;
            var ctCostumeCategoryCombo;
            var ctMachineTypeCombo;
            var ctCollarTypeCombo;
			var ctProductFamilyCombo;
			var ctVersionCombo;
			var ctSeasonNumberCombo;
			var ctProductIdentificationStyleCombo;
			
			var productIdentificationForm;
			
			var selectedProductIdentification;
			
			var selectProductIdentificationCallBack = function(selectedIds, selectedRecords){
				var preId = Ext.getCmp('id').getValue();
				
				productIdentificationForm.getForm().load({
						url:'../../servlet/ProductIdentificationServlet?action=3&id=' + selectedProductIdentification.id, 
						waitMsg:Ext.LoadMask.prototype.msg, 
						success: function(form, action){
							loadOnSuccessful()
							Ext.getCmp('id').setValue(preId);
							document.getElementById('similarId').value = selectedProductIdentification.id;
							Ext.getCmp('referenceAs').setValue(selectedProductIdentification.reference);
//							document.getElementById('customImg2').src =  '../../_temp/' + document.getElementById('frontPhotoName').value;
//							document.getElementById('customImg3').src =  '../../_temp/' + document.getElementById('backPhotoName').value;
//							document.getElementById('customImg4').src =  '../../_temp/' + document.getElementById('otherPhotoName').value;
							document.getElementById('customImg').src =  '../../_temp/noimage.gif';
							document.getElementById('customImg1').src =  '../../_temp/noimage.gif';
							document.getElementById('customImg2').src =  '../../_temp/noimage.gif';
							document.getElementById('customImg3').src =  '../../_temp/noimage.gif';
							document.getElementById('sketch1-file').value = null;
                            document.getElementById('sketch2-file').value = null;
                            document.getElementById('sketch3-file').value = null;
                            document.getElementById('sketch4-file').value = null;
                            
                            
                            document.getElementById('sketch1DescriptionFR').value = '';
                            document.getElementById('sketch1DescriptionCN').value = '';
                            document.getElementById('sketch1DescriptionEN').value = '';
                            
                            document.getElementById('sketch2DescriptionFR').value = '';
                            document.getElementById('sketch2DescriptionCN').value = '';
                            document.getElementById('sketch2DescriptionEN').value = '';
                            
                            document.getElementById('sketch3DescriptionFR').value = '';
                            document.getElementById('sketch3DescriptionCN').value = '';
                            document.getElementById('sketch3DescriptionEN').value = '';
						}
				});
			};
            
            var selectMsCallback = function(id, name){
                document.getElementById('biMeasureSpecificationId').value = id;
                document.getElementById('biMeasureSpecificationName').value = name;
            }
			
//			var selectReferenceCallback = function(id,reference, needle,ctMachineType, weight,front,back,sleeves,bottomThrum,sleevesThrum,necklineThrum,frontPhotoName,backPhotoName,otherPhotoName){
//               document.getElementById('biReferenceId').value = id;
//			   document.getElementById('reference').value = reference;
//			   document.getElementById('needle').value = needle;
//			   ctMachineTypeCombo.setValue(ctMachineType);
//			   document.getElementById('weight').value = weight;
//			   document.getElementById('front').value = front;
//			   document.getElementById('back').value = back;
//			   document.getElementById('sleeves').value = sleeves;
//			   document.getElementById('bottomThrum').value = bottomThrum;
//			   document.getElementById('sleevesThrum').value = sleevesThrum;
//			   document.getElementById('necklineThrum').value = necklineThrum;			   
//			   document.getElementById('customImg2').src = '../../_temp/' + frontPhotoName;
//			   document.getElementById('customImg3').src = '../../_temp/' + backPhotoName;
//			   document.getElementById('customImg4').src = '../../_temp/' + otherPhotoName;
//            }

			var setPatronageNumer = function(){
				var reference = document.getElementById('reference').value;
				if(reference == null || reference == ''){
					return;
				}
				if(ctProductFamilyCombo.getValue() == null || ctProductFamilyCombo.getValue() == ''){
					return;
				}
				if(ctCollarTypeCombo.getValue() == null || ctCollarTypeCombo.getValue() == ''){
					return;
				}
				if(ctSeasonNumberCombo.getValue() == null || ctSeasonNumberCombo.getValue() == ''){
					return;
				}
				var pf = ctProductFamilyCombo.getRawValue();
				var ct = ctCollarTypeCombo.getRawValue();
				var sn = ctSeasonNumberCombo.getRawValue();
				var maxReferenceIndextXmlLoader = new xmlLoader('../../servlet/ProductIdentificationServlet?action=12&reference=' + reference);
				var maxIndex = maxReferenceIndextXmlLoader.getValueByTagName('item');
				document.getElementById('referenceIndex').value = maxIndex;
				
				var patronageNumer = pf.substring(pf.length-1) + '-' + ct.substring(ct.length-1) + '-' + sn + '-' + maxIndex;
				document.getElementById('patronageNumer').value = patronageNumer
				
			}
			
			var setReference = function(){
				if(ctCollarTypeCombo.getValue() == null || ctCollarTypeCombo.getValue() == ''){
					return;
				}
				if(ctSeasonNumberCombo.getValue() == null || ctSeasonNumberCombo.getValue() == ''){
					return;
				}
				var ct = ctCollarTypeCombo.getRawValue();
				var sn = ctSeasonNumberCombo.getRawValue();
				var maxReferenceIndextXmlLoader = new xmlLoader('../../servlet/ProductIdentificationServlet?action=12&ctCollarType=' + ctCollarTypeCombo.getValue() + '&ctSeasonNumber=' + ctSeasonNumberCombo.getValue());
				var maxIndex = maxReferenceIndextXmlLoader.getValueByTagName('item');
				var reference = sn + '-' + ct.substring(ct.indexOf('=') + 2) + '-' + maxIndex;
				document.getElementById('referenceIndex').value = maxIndex;
				document.getElementById('reference').value = reference;
			}
			
			var selectFranceCustomerCallback = function(customerId, customerName, customerDepartment){
                document.getElementById('customerId').value = customerId;
                document.getElementById('customerName').value = customerName;
                document.getElementById('customerDepartment').value = customerDepartment;
            }
            
            var currentAomor;
            var frontImg;
            var backImg;
            var sleevesImg
            var necklineThrumImg;
            var bottomThrumImg
            var sleevesThrumImg
            var selectArmorCallback = function(armorId, reference, ctArmorType, photo1Name,ctArmor1Type, armorTypeE, ctArmorSet){
            	eval(currentAomor + 'Img="' + photo1Name + '";');
            	Ext.getCmp(currentAomor).setValue(ctArmorType + ' ' + ctArmor1Type + ' ' + armorTypeE + ' ' + ctArmorSet);
            	Ext.getCmp(currentAomor + 'Id').setValue(armorId);
            }
            
            var selectedFactory;
            var selectFactoryCallback = function(factoryId, factoryName){
				document.getElementById('factoryId').value = factoryId;
				document.getElementById('factoryNameCN').value = selectedFactory.nameCN;
				document.getElementById('factoryNameEN').value = selectedFactory.nameEN;
				enableMachine(selectedFactory);
			}
			
			var enableMachine = function(selectedFactory){
				Ext.getCmp('isNeedle').disable();
				Ext.getCmp('isHand').disable();
				Ext.getCmp('isIntarsiaHand').disable();
				Ext.getCmp('isElectronic').disable();
				Ext.getCmp('isEquipmentOther1').disable();
				Ext.getCmp('isEquipmentOther2').disable();
				Ext.getCmp('isEquipmentOther3').disable();
			
				if(selectedFactory.isNeedle == 'on')
					Ext.getCmp('isNeedle').enable();
				if(selectedFactory.isHand == 'on')
					Ext.getCmp('isHand').enable();
				if(selectedFactory.isIntarsiaHand == 'on')
					Ext.getCmp('isIntarsiaHand').enable();
				if(selectedFactory.isElectronic == 'on')
					Ext.getCmp('isElectronic').enable();
				if(selectedFactory.isEquipmentOther1 == 'on')
					Ext.getCmp('isEquipmentOther1').enable();
				if(selectedFactory.isEquipmentOther2 == 'on')
					Ext.getCmp('isEquipmentOther2').enable();
				if(selectedFactory.isEquipmentOther3 == 'on')
					Ext.getCmp('isEquipmentOther3').enable();
					
			}
			
			var enableJauge = function(selectedFactory, machine){
				Ext.getCmp('isJauge3').disable();
				Ext.getCmp('isJauge5').disable();
				Ext.getCmp('isJauge7').disable();
				Ext.getCmp('isJauge9').disable();
				Ext.getCmp('isJauge12').disable();
				Ext.getCmp('isJauge14').disable();
				Ext.getCmp('isJauge16').disable();
				Ext.getCmp('isJauge18').disable();
				
				if(selectedFactory[machine + 'Jauge3'] == 'on')
					Ext.getCmp('isJauge3').enable();
				if(selectedFactory[machine + 'Jauge5'] == 'on')
					Ext.getCmp('isJauge5').enable();
				if(selectedFactory[machine + 'Jauge7'] == 'on')
					Ext.getCmp('isJauge7').enable();
				if(selectedFactory[machine + 'Jauge9'] == 'on')
					Ext.getCmp('isJauge9').enable();
				if(selectedFactory[machine + 'Jauge12'] == 'on')
					Ext.getCmp('isJauge12').enable();
				if(selectedFactory[machine + 'Jauge14'] == 'on')
					Ext.getCmp('isJauge14').enable();
				if(selectedFactory[machine + 'Jauge16'] == 'on')
					Ext.getCmp('isJauge16').enable();
				if(selectedFactory[machine + 'Jauge18'] == 'on')
					Ext.getCmp('isJauge18').enable();
				
			}

			var removeSketch = function(sketchId){
				if(Ext.getCmp(sketchId).getValue() == 'true'){
					Ext.getCmp(sketchId).setValue(false);
					messageTip.msg(message.get('message.tip'), message.get('message.edit.resetimg'));
				}else{
					Ext.getCmp(sketchId).setValue(true);
					messageTip.msg(message.get('message.tip'), message.get('message.edit.deleteimg'));
				}
			}

			var copyDensity = function(densityId){
				Ext.getCmp('densityColumms' + densityId).setValue(Ext.getCmp('densityColumms' + (densityId-1)).getValue());
				Ext.getCmp('densityRows' + densityId).setValue(Ext.getCmp('densityRows'+ (densityId-1)).getValue());
					
			}
			
            Ext.onReady(function(){
                Ext.QuickTips.init();
                Ext.form.Field.prototype.msgTarget = 'side';
                
                ctDesignTypeStore = new Ext.data.Store({
                
                    reader: new Ext.data.XmlReader({
                        record: 'item',
                        id: 'code',
                        totalRecords: 'itemTotal'
                    }, ['code', 'description']),
                    data: ctDesignTypeLoader.getXml()
                });
                
                ctCostumeCategoryStore = new Ext.data.Store({
                
                    reader: new Ext.data.XmlReader({
                        record: 'item',
                        id: 'code',
                        totalRecords: 'itemTotal'
                    }, ['code', 'description']),
                    data: ctCostumeCategoryXmlLoader.getXml()
                });
                
                ctMachineTypeStore = new Ext.data.Store({
                
                    reader: new Ext.data.XmlReader({
                        record: 'item',
                        id: 'code',
                        totalRecords: 'itemTotal'
                    }, ['code', 'description']),
                    data: ctMachineTypeXmlLoader.getXml()
                });
                
                ctCollarTypeStore = new Ext.data.Store({
                    reader: new Ext.data.XmlReader({
                        record: 'item',
                        id: 'code',
                        totalRecords: 'itemTotal'
                    }, [ 
                    'code', 'description']),
					data: ctCollarTypeXmlLoader.getXml()
                });
				
				ctVersionStore = new Ext.data.Store({
                    reader: new Ext.data.XmlReader({
                        record: 'item',
                        id: 'code',
                        totalRecords: 'itemTotal'
                    }, [ 
                    'code', 'description']),
					data: ctVersionLoader.getXml()
                });
				
				ctSeasonNumberStore = new Ext.data.Store({
                    reader: new Ext.data.XmlReader({
                        record: 'item',
                        id: 'code',
                        totalRecords: 'itemTotal'
                    }, [ 
                    'code', 'description']),
					data: ctSeasonNumberLoader.getXml()
                });
				
				ctProductFamilyStore = new Ext.data.Store({
                    reader: new Ext.data.XmlReader({
                        record: 'item',
                        id: 'code',
                        totalRecords: 'itemTotal'
                    }, [ 
                    'code', 'description']),
					data: ctProductFamilyLoader.getXml()
                });
                
                ctProductIdentificationStyleStore = new Ext.data.Store({
                    reader: new Ext.data.XmlReader({
                        record: 'item',
                        id: 'code',
                        totalRecords: 'itemTotal'
                    }, [ 
                    'code', 'description']),
					data: ctProductIdentificationStyleLoader.getXml()
                });
				
				ctProductFamilyStore.each(function(record){
					//alert(record.data.code);
					if(record.data.code >= 20){
						ctProductFamilyStore.remove(record);
					}
				});
                
                ctDesignTypeCombo = new Ext.form.ComboBox({
                    fieldLabel: piMessage.get('ui.productidentification.designtype'),
                    id: 'ctDesignType',
                    name: 'ctDesignType',
                    allowBlank: false,
                    blankText: message.get('message.edit.noblank'),
                    valueField: 'code',
                    typeAhead: true,
                    store: ctDesignTypeStore,
                    displayField: 'description',
                    forceSelection: true,
                    triggerAction: 'all',
                    emptyText: message.get('message.combo.pleaseselect'),
                    selectOnFocus: true,
                    mode: 'local'
                });
                
                ctCostumeCategoryCombo = new Ext.form.ComboBox({
                    fieldLabel: piMessage.get('ui.productidentification.costumecategory'),
                    id: 'ctCostumeCategory',
                    name: 'ctCostumeCategory',
                    allowBlank: false,
                    blankText: message.get('message.edit.noblank'),
                    valueField: 'code',
                    typeAhead: true,
                    store: ctCostumeCategoryStore,
                    displayField: 'description',
                    forceSelection: true,
                    triggerAction: 'all',
                    emptyText: message.get('message.combo.pleaseselect'),
                    selectOnFocus: true,
                    mode: 'local'
                });
                
                ctCollarTypeCombo = new Ext.form.ComboBox({
					fieldLabel: piMessage.get('ui.productidentification.style'),
					id: 'ctCollarType',
					name: 'ctCollarType',
					allowBlank: false,
                    blankText: message.get('message.edit.noblank'),
					editable: false,
				    store: ctCollarTypeStore,
					valueField: 'code',
				    displayField:'description',
				    triggerAction: 'all',
				    anchor: '90%',
				    emptyText: message.get('message.combo.pleaseselect'),
				    selectOnFocus:true,
					mode: 'local',
					listeners: {
						select: {
							fn: function (thisComb, record,index){
			                	Ext.getCmp('sleevesId').enable();
								Ext.getCmp('backId').enable();
								Ext.getCmp('sleevesThrumId').enable();
								Ext.getCmp('bottomThrumId').enable();
								Ext.getCmp('necklineThrumId').enable();

								Ext.getCmp('sleeves').enable();
								Ext.getCmp('back').enable();
								Ext.getCmp('sleevesThrum').enable();
								Ext.getCmp('bottomThrum').enable();
								Ext.getCmp('necklineThrum').enable();
								
								if(thisComb.getValue() == '09' || thisComb.getValue() == '10'){
									Ext.getCmp('sleeves').disable();
									Ext.getCmp('sleevesId').disable();
								}else if(thisComb.getValue() == '11'){
									Ext.getCmp('sleeves').disable();
									Ext.getCmp('back').disable();
									Ext.getCmp('sleevesThrum').disable();
									Ext.getCmp('necklineThrum').disable();

									Ext.getCmp('sleevesId').disable();
									Ext.getCmp('backId').disable();
									Ext.getCmp('sleevesThrumId').disable();
									Ext.getCmp('necklineThrumId').disable();
								}else if(thisComb.getValue() == '12'){
									Ext.getCmp('sleevesId').disable();
									Ext.getCmp('sleevesThrumId').disable();
									Ext.getCmp('bottomThrumId').disable();
									Ext.getCmp('necklineThrumId').disable();

									Ext.getCmp('sleeves').disable();
									Ext.getCmp('sleevesThrum').disable();
									Ext.getCmp('bottomThrum').disable();
									Ext.getCmp('necklineThrum').disable();
								}
							}
						}
					}
				});
                
                ctMachineTypeCombo = new Ext.form.ComboBox({
                    fieldLabel: referenceMessage.get('ui.reference.machinetype'),
                    id: 'ctMachineType',
                    name: 'ctMachineType',
                    allowBlank: false,
                    blankText: message.get('message.edit.noblank'),
                    valueField: 'code',
                    typeAhead: true,
                    store: ctMachineTypeStore,
                    displayField: 'description',
                    forceSelection: true,
                    triggerAction: 'all',
                    emptyText: message.get('message.combo.pleaseselect'),
                    selectOnFocus: true,
                    mode: 'local'
                });
                
				ctVersionCombo = new Ext.form.ComboBox({
                    fieldLabel: piMessage.get('ui.productidentification.chartversion'),
                    id: 'ctVersion',
                    name: 'ctVersion',
                    allowBlank: false,
                    blankText: message.get('message.edit.noblank'),
                    valueField: 'code',
                    typeAhead: true,
                    store: ctVersionStore,
                    displayField: 'description',
                    forceSelection: true,
                    triggerAction: 'all',
                    emptyText: message.get('message.combo.pleaseselect'),
                    selectOnFocus: true,
                    mode: 'local'
                });
				
				ctSeasonNumberCombo = new Ext.form.ComboBox({
                    fieldLabel: piMessage.get('ui.productidentification.seasonnumber'),
                    id: 'ctSeasonNumber',
                    name: 'ctSeasonNumber',
                    allowBlank: false,
                    blankText: message.get('message.edit.noblank'),
                    valueField: 'code',
                    typeAhead: true,
                    store: ctSeasonNumberStore,
                    displayField: 'description',
                    forceSelection: true,
                    triggerAction: 'all',
                    emptyText: message.get('message.combo.pleaseselect'),
                    selectOnFocus: true,
                    mode: 'local',
					listeners: {
						select: {
							fn: function (thisComb, record,index){
								//setReference();
							}
						}
					}
                });
				
				ctProductFamilyCombo = new Ext.form.ComboBox({
                    fieldLabel: message.get('message.edit.productfamily'),
                    id: 'ctProductFamily',
                    name: 'ctProductFamily',
                    allowBlank: false,
                    blankText: message.get('message.edit.noblank'),
                    valueField: 'code',
                    typeAhead: true,
                    store: ctProductFamilyStore,
                    displayField: 'description',
                    forceSelection: true,
                    triggerAction: 'all',
                    emptyText: message.get('message.combo.pleaseselect'),
                    selectOnFocus: true,
                    mode: 'local',
					listeners: {
						select: {
							fn: function (thisComb, record,index){
								setPatronageNumer();
							}
						}
					}
                });
                
                ctProductIdentificationStyleCombo = new Ext.form.ComboBox({
                    hideLabel: true,
                    id: 'ctProductIdentificationStyle',
                    name: 'ctProductIdentificationStyle',
                    allowBlank: false,
                    blankText: message.get('message.edit.noblank'),
                    valueField: 'code',
                    typeAhead: true,
                    store: ctProductIdentificationStyleStore,
                    displayField: 'description',
                    forceSelection: true,
                    triggerAction: 'all',
                    anchor: '60%',
                    emptyText: message.get('message.combo.pleaseselect'),
                    selectOnFocus: true,
                    mode: 'local'
                });
                
                productIdentificationForm = new Ext.FormPanel({
                    fileUpload: true,
                    labelAlign: 'left',
                    url: '../../servlet/ProductIdentificationServlet?action=1',
                    frame: true,
                    title: piMessage.get('ui.productidentification.edittitle'),
                    bodyStyle: 'padding:5px 5px 5px 5px;margin-top: 2px;',
                    width: '100%',
                    labelWidth: 115,
                    reader: new Ext.data.XmlReader({
                        record: 'item'
                    }, [{
                        name: 'id',
                        mapping: 'id'
                    }, {
                        name: 'ctCostumeCategory',
                        mapping: 'ctCostumeCategory'
                    }, {
                        name: 'ctMachineType',
                        mapping: 'ctMachineType'
                    },{
						name: 'customerId',
						mapping: 'customerId'
					},{
						name: 'customerName',
						mapping: 'customerName'
					},{
						name: 'customerDepartment',
						mapping: 'customerDepartment'
					},{
						name: 'factoryId',
						mapping: 'factoryId'
					},{
						name: 'factoryNameCN',
						mapping: 'factoryNameCN'
					},{
						name: 'factoryNameEN',
						mapping: 'factoryNameEN'
					}, {
                        name: 'isSimilar',
                        mapping: 'isSimilar'
                    },{
                        name: 'isNewfashioned',
                        mapping: 'isNewfashinoed'
                    },{
                        name: 'isDifficullty',
                        mapping: 'isDifficullty'
                    },{
                        name: 'dhlNumber',
                        mapping: 'dhlNumber'
                    },{
                        name: 'orderNumber',
                        mapping: 'orderNumber'
                    }, {
                        name: 'ctDesignType',
                        mapping: 'ctDesignType'
                    },{
                        name: 'ctCollarType',
                        mapping: 'ctCollarType'
                    }, {
                        name: 'ctProductIdentificationStyle',
                        mapping: 'ctProductIdentificationStyle'
                    }, {
                        name: 'customerLinkman',
                        mapping: 'customerLinkman'
                    },{
                        name: 'model',
                        mapping: 'model'
                    }, {
                        name: 'ctSeasonNumber',
                        mapping: 'ctSeasonNumber'
                    }, {
                        name: 'biReferenceId',
                        mapping: 'biReferenceId'
                    }, {
                        name: 'reference',
                        mapping: 'reference'
                    }, {
                        name: 'createDate',
                        mapping: 'createDate'
                    }, {
                        name: 'ctVersion',
                        mapping: 'ctVersion'
                    }, {
                        name: 'patronageNumer',
                        mapping: 'patronageNumer'
                    }, {
                        name: 'frontId',
                        mapping: 'frontId'
                    }, {
                        name: 'frontReference',
                        mapping: 'frontReference'
                    }, {
                        name: 'frontPhotoName',
                        mapping: 'frontPhotoName'
                    }, {
                        name: 'backId',
                        mapping: 'backId'
                    }, {
                        name: 'backReference',
                        mapping: 'backReference'
                    }, {
                        name: 'backPhotoName',
                        mapping: 'backPhotoName'
                    }, {
                        name: 'sleevesId',
                        mapping: 'sleevesId'
                    }, {
                        name: 'sleevesReference',
                        mapping: 'sleevesReference'
                    }, {
                        name: 'sleevesPhotoName',
                        mapping: 'sleevesPhotoName'
                    }, {
                        name: 'bottomThrumId',
                        mapping: 'bottomThrumId'
                    }, {
                        name: 'bottomThrumReference',
                        mapping: 'bottomThrumReference'
                    }, {
                        name: 'bottomThrumPhotoName',
                        mapping: 'bottomThrumPhotoName'
                    }, {
                        name: 'sleevesThrumId',
                        mapping: 'sleevesThrumId'
                    }, {
                        name: 'sleevesThrumReference',
                        mapping: 'sleevesThrumReference'
                    }, {
                        name: 'sleevesThrumPhotoName',
                        mapping: 'sleevesThrumPhotoName'
                    }, {
                        name: 'necklineThrumId',
                        mapping: 'necklineThrumId'
                    }, {
                        name: 'necklineThrumReference',
                        mapping: 'necklineThrumReference'
                    }, {
                        name: 'necklineThrumPhotoName',
                        mapping: 'necklineThrumPhotoName'
                    }, {
                        name: 'needle',
                        mapping: 'needle'
                    }, {
                        name: 'weight',
                        mapping: 'weight'
                    }, {
                        name: 'comment',
                        mapping: 'comment'
                    }, {
                        name: 'customerId',
                        mapping: 'customerId'
                    }, {
                        name: 'sketch1Name',
                        mapping: 'sketch1Name'
                    }, {
                        name: 'sketch1DescriptionFR',
                        mapping: 'sketch1DescriptionFR'
                    }, {
                        name: 'sketch1DescriptionCN',
                        mapping: 'sketch1DescriptionCN'
                    }, {
                        name: 'sketch1DescriptionEN',
                        mapping: 'sketch1DescriptionEN'
                    }, {
                        name: 'sketch2Name',
                        mapping: 'sketch2Name'
                    }, {
                        name: 'sketch2DescriptionFR',
                        mapping: 'sketch2DescriptionFR'
                    }, {
                        name: 'sketch2DescriptionCN',
                        mapping: 'sketch2DescriptionCN'
                    }, {
                        name: 'sketch2DescriptionEN',
                        mapping: 'sketch2DescriptionEN'
                    }, {
                        name: 'sketch3Name',
                        mapping: 'sketch3Name'
                    }, {
                        name: 'sketch3DescriptionFR',
                        mapping: 'sketch3DescriptionFR'
                    }, {
                        name: 'sketch3DescriptionCN',
                        mapping: 'sketch3DescriptionCN'
                    }, {
                        name: 'sketch3DescriptionEN',
                        mapping: 'sketch3DescriptionEN'
                    }, {
                        name: 'sketch4Name',
                        mapping: 'sketch4Name'
                    }, {
                        name: 'frontPhotoName',
                        mapping: 'frontPhotoName'
                    }, {
                        name: 'backPhotoName',
                        mapping: 'backPhotoName'
                    }, {
                        name: 'otherPhotoName',
                        mapping: 'otherPhotoName'
                    }, {
                        name: 'biMeasureSpecificationId',
                        mapping: 'biMeasureSpecificationId'
                    }, {
                        name: 'biMeasureSpecificationName',
                        mapping: 'biMeasureSpecificationName'
                    }, {
                        name: 'ctProductFamily',
                        mapping: 'ctProductFamily'
                    }, {
                        name: 'referenceIndex',
                        mapping: 'referenceIndex'
                    }, {
                        name: 'referenceAs',
                        mapping: 'referenceAs'
                    }, {
                        name: 'similarId',
                        mapping: 'similarId'
                    }, {
                        name: 'equipment',
                        mapping: 'equipment'
                    }, {
                        name: 'jauge',
                        mapping: 'jauge'
                    }, {
                        name: 'densityColumms1',
                        mapping: 'densityColumms1'
                    }, {
                        name: 'densityRows1',
                        mapping: 'densityRows1'
                    }, {
                        name: 'densityColumms2',
                        mapping: 'densityColumms2'
                    }, {
                        name: 'densityRows2',
                        mapping: 'densityRows2'
                    }, {
                        name: 'densityColumms3',
                        mapping: 'densityColumms3'
                    }, {
                        name: 'densityRows3',
                        mapping: 'densityRows3'
                    }, {
                        name: 'densityColumms4',
                        mapping: 'densityColumms4'
                    }, {
                        name: 'densityRows4',
                        mapping: 'densityRows4'
                    }, {
                        name: 'densityColumms5',
                        mapping: 'densityColumms5'
                    }, {
                        name: 'densityRows5',
                        mapping: 'densityRows5'
                    }, {
                        name: 'densityColumms6',
                        mapping: 'densityColumms6'
                    }, {
                        name: 'densityRows6',
                        mapping: 'densityRows6'
                    }]),
                    items: [{
                        xtype: 'fieldset',
                        collapsible: true,
                        title: piMessage.get('ui.productidentification.set1'),
                        autoHeight: true,
                        items: [{
                            id: 'id',
                            name: 'id',
                            xtype: 'hidden'
                        },{
                            id: 'similarId',
                            name: 'similarId',
                            xtype: 'hidden'
                        }, {
                            id: 'sketch1Name',
                            name: 'sketch1Name',
                            xtype: 'hidden'
                        }, {
                            id: 'isSketch1Deleted',
                            name: 'isSketch1Deleted',
                            xtype: 'hidden',
                            value:false
                        }, {
                            id: 'sketch2Name',
                            name: 'sketch2Name',
                            xtype: 'hidden'
                        }, {
                            id: 'isSketch2Deleted',
                            name: 'isSketch2Deleted',
                            xtype: 'hidden',
                            value:false
                        }, {
                            id: 'sketch3Name',
                            name: 'sketch3Name',
                            xtype: 'hidden'
                        }, {
                            id: 'isSketch3Deleted',
                            name: 'isSketch3Deleted',
                            xtype: 'hidden',
                            value:false
                        }, {
                            id: 'sketch4Name',
                            name: 'sketch4Name',
                            xtype: 'hidden'
                        }, {
                            id: 'isSketch4Deleted',
                            name: 'isSketch4Deleted',
                            xtype: 'hidden',
                            value:false
                        }, {
                            id: 'frontPhotoName',
                            name: 'frontPhotoName',
                            xtype: 'hidden'
                        }, {
                            id: 'backPhotoName',
                            name: 'backPhotoName',
                            xtype: 'hidden'
                        }, {
                            id: 'otherPhotoName',
                            name: 'otherPhotoName',
                            xtype: 'hidden'
                        }, {
                            id: 'biMeasureSpecificationId',
                            name: 'biMeasureSpecificationId',
                            xtype: 'hidden'
                        }, {
                            id: 'referenceIndex',
                            name: 'referenceIndex',
                            xtype: 'hidden'
                        },{
	                        id: 'customerId',
	                        name: 'customerId',
	                        xtype: 'hidden'
	                    },{
	                        id: 'factoryId',
	                        name: 'factoryId',
	                        xtype: 'hidden'
	                    },{
                            layout: 'column',
                            items: [{
                                columnWidth: .30,
                                layout: 'form',
                                items: [ctCollarTypeCombo]
                            }, {
                                columnWidth: .25,
                                layout: 'form',
                                items: [ctProductIdentificationStyleCombo]
                            }, {
                                columnWidth: .10,
                                layout: 'form',
                                items: [{html: '<div class="div"><label class="x-form-item-label">&nbsp;</label></div><br/>'}]
                            }, {
                                columnWidth: .35,
                                layout: 'form',
                                items: [{
                                    name: 'createDate',
                                    fieldLabel: message.get('message.edit.createdate') + "(d/m/Y)",
                                    xtype: 'datefield',
                                    allowBlank: false,
                                    blankText: message.get('message.edit.noblank')
                                }]
                            }]
                        }, {
                            layout: 'column',
                            items: [{
                                columnWidth: .33,
                                layout: 'form',
                                items: [
                                
                                /*{
		                            name: 'style',
		                            fieldLabel: piMessage.get('ui.productidentification.style'),
		                            xtype: 'textfield',
		                            anchor: '86%',
		                            allowBlank: false,
		                            blankText: message.get('message.edit.noblank'),
		                            maxLength: 128
		                        },*/
		                        {
                                    id: 'customerName',
                                    name: 'customerName',
                                    fieldLabel: message.get('message.edit.customername'),
                                    xtype: 'textfield',
                                    anchor: '86%',
                                    allowBlank: false,
                                    blankText: message.get('message.edit.noblank'),
                                    emptyText: message.get('message.combo.pleaseselect'),
                                    readOnly: true,
                                    maxLength: 64,
                                    listeners: {
                                        'render': {
                                            fn: function(){
                                                Ext.getCmp('customerName').getEl().on('click', function(){
                                                    selectFranceCustomer(selectFranceCustomerCallback);
                                                }, this);
                                            },
                                            scope: this
                                        }
                                    }
                                },{
                                    name: 'reference',
									id: 'reference',
                                    fieldLabel: referenceMessage.get('ui.reference.reference'),
                                    xtype: 'textfield',
                                    anchor: '86%',
                                    allowBlank: false,
                                    blankText: message.get('message.edit.noblank'),
                                    maxLength: 64,
                                    listeners: {
                                        'render': {
                                            fn: function(){
                                                Ext.getCmp('reference').getEl().on('dbclick', function(){
                                                    //setReference();
                                                }, this);
                                            },
                                            scope: this
                                        }
                                    }
                                },{
                                    name: 'referenceAs',
									id: 'referenceAs',
                                    fieldLabel: piMessage.get('ui.productidentification.referenceas') + '&nbsp;&nbsp;<img src="../../images/icons/arrow_rotate_clockwise.png" style="cursor: hand;" onclick="selectSimilaryPI();"/>',
                                    xtype: 'textfield',
                                    anchor: '86%',
                                    //blankText: message.get('message.edit.noblank'),
                                    maxLength: 64,
                                    listeners: {
                                        'render': {
                                            fn: function(){
                                                Ext.getCmp('referenceAs').getEl().on('click', function(){
                                                    
                                                }, this);
                                            },
                                            scope: this
                                        }
                                    }
                                }
                                /*,{
                                    id: 'biMeasureSpecificationName',
                                    name: 'biMeasureSpecificationName',
                                    fieldLabel: piMessage.get('ui.productidentification.measurespecification'),
                                    xtype: 'textfield',
                                    anchor: '86%',
                                    allowBlank: false,
                                    blankText: message.get('message.edit.noblank'),
                                    emptyText: message.get('message.combo.pleaseselect'),
                                    maxLength: 64,
									readOnly: true,
                                    listeners: {
                                        'render': {
                                            fn: function(){
                                                Ext.getCmp('biMeasureSpecificationName').getEl().on('click', function(){
                                                    selectMs();
                                                }, this);
                                            },
                                            scope: this
                                        }
                                    }
                                }*/
                                ]
                            }, {
                                columnWidth: .33,
                                layout: 'form',
                                items: [{
                                    xtype: 'textfield',
                                    fieldLabel: fcMessage.get('ui.francecustomer.department'),
                                    id: 'customerDepartment',
                                    name: 'customerDepartment',
                                    anchor: '86%',
                                    allowBlank: true,
                                    blankText: message.get('message.edit.noblank'),
                                    readOnly: true,
                                    maxLength: 64,
                                    tabIndex: 1
                                },ctDesignTypeCombo]
                            }, {
                                columnWidth: .33,
                                layout: 'form',
                                items: [ctSeasonNumberCombo,ctVersionCombo
                                /*,{
                                    xtype: 'numberfield',
                                    decimalPrecision: 3,
                                    fieldLabel: referenceMessage.get('ui.reference.weight') + '(Kg)',
                                    id: 'weight',
                                    name: 'weight',
                                    anchor: '86%',
                                    allowBlank: false,
                                    blankText: message.get('message.edit.noblank'),
                                    maxLength: 64,
                                    tabIndex: 1
                                }*/]
                            }
                            ]
                        }]
                    }, {
                        xtype: 'fieldset',
                        collapsible: true,
                        title: piMessage.get('ui.productidentification.set2'),
                        autoHeight: true,
                        items: [{
                            layout: 'column',
                            items: [{
                                columnWidth: .4,
                                layout: 'form',
                                items: [{
			                        id: 'frontId',
			                        name: 'frontId',
			                        xtype: 'hidden'
			                    },{
			                        id: 'frontPhotoName',
			                        name: 'frontPhotoName',
			                        xtype: 'hidden'
			                    },{
                                    name: 'frontReference',
									id: 'front',
                                    fieldLabel:referenceMessage.get('ui.reference.front') + '&nbsp;&nbsp;&nbsp;&nbsp;<img id="frontTip" src="../../images/icons/images.png"/>',
                                    xtype: 'textfield',
                                    anchor: '80%',
                                    allowBlank: false,
                                    blankText: message.get('message.edit.noblank'),
                                    emptyText: message.get('message.combo.pleaseselect'),
                                    readOnly: true,
                                    maxLength: 128,
                                    listeners: {
                                        'render': {
                                            fn: function(){
                                                Ext.getCmp('front').getEl().on('click', function(){
                                                	currentAomor = 'front';
                                                    selectArmor(selectArmorCallback);
                                                }, this);
                                            },
                                            scope: this
                                        }
                                    }
                                },{
			                        id: 'backId',
			                        name: 'backId',
			                        xtype: 'hidden'
			                    },{
			                        id: 'backPhotoName',
			                        name: 'backPhotoName',
			                        xtype: 'hidden'
			                    },{
                                    name: 'backReference',
									id: 'back',
                                    fieldLabel:referenceMessage.get('ui.reference.back') + '&nbsp;&nbsp;&nbsp;&nbsp;<img id="backTip" src="../../images/icons/images.png"/>',
                                    xtype: 'textfield',
                                    anchor: '80%',
                                    allowBlank: false,
                                    blankText: message.get('message.edit.noblank'),
                                    emptyText: message.get('message.combo.pleaseselect'),
                                    readOnly: true,
                                    maxLength: 128,
                                    listeners: {
                                        'render': {
                                            fn: function(){
                                                Ext.getCmp('back').getEl().on('click', function(){
                                                	currentAomor = 'back';
                                                    selectArmor(selectArmorCallback);
                                                }, this);
                                            },
                                            scope: this
                                        }
                                    }
                                },{
			                        id: 'sleevesId',
			                        name: 'sleevesId',
			                        xtype: 'hidden'
			                    },{
			                        id: 'sleevesPhotoName',
			                        name: 'sleevesPhotoName',
			                        xtype: 'hidden'
			                    },{
                                    name: 'sleevesReference',
									id: 'sleeves',
                                    fieldLabel:referenceMessage.get('ui.reference.sleeves') + '&nbsp;&nbsp;&nbsp;&nbsp;<img id="sleevesTip" src="../../images/icons/images.png"/>',
                                    xtype: 'textfield',
                                    anchor: '80%',
                                    allowBlank: false,
                                    emptyText: message.get('message.combo.pleaseselect'),
                                    readOnly: true,
                                    blankText: message.get('message.edit.noblank'),
                                    maxLength: 128,
                                    listeners: {
                                        'render': {
                                            fn: function(){
                                                Ext.getCmp('sleeves').getEl().on('click', function(){
                                                	currentAomor = 'sleeves';
                                                    selectArmor(selectArmorCallback);
                                                }, this);
                                            },
                                            scope: this
                                        }
                                    }
                                },{
			                        id: 'necklineThrumId',
			                        name: 'necklineThrumId',
			                        xtype: 'hidden'
			                    },{
			                        id: 'necklineThrumPhotoName',
			                        name: 'necklineThrumPhotoName',
			                        xtype: 'hidden'
			                    },{
                                    name: 'necklineThrumReference',
									id: 'necklineThrum',
                                    fieldLabel:referenceMessage.get('ui.reference.necklinethrum') + '&nbsp;&nbsp;&nbsp;&nbsp;<img id="necklineThrumTip" src="../../images/icons/images.png"/>',
                                    xtype: 'textfield',
                                    anchor: '80%',
                                    allowBlank: false,
                                    emptyText: message.get('message.combo.pleaseselect'),
                                    readOnly: true,
                                    blankText: message.get('message.edit.noblank'),
                                    maxLength: 128,
                                    listeners: {
                                        'render': {
                                            fn: function(){
                                                Ext.getCmp('necklineThrum').getEl().on('click', function(){
                                                	currentAomor = 'necklineThrum';
                                                    selectArmor(selectArmorCallback);
                                                }, this);
                                            },
                                            scope: this
                                        }
                                    }
                                },{
			                        id: 'bottomThrumId',
			                        name: 'bottomThrumId',
			                        xtype: 'hidden'
			                    },{
			                        id: 'bottomThrumPhotoName',
			                        name: 'bottomThrumPhotoName',
			                        xtype: 'hidden'
			                    },{
                                    name: 'bottomThrumReference',
									id: 'bottomThrum',
                                    fieldLabel:referenceMessage.get('ui.reference.bottomthrum') + '&nbsp;&nbsp;&nbsp;&nbsp;<img id="bottomThrumTip" src="../../images/icons/images.png"/>',
                                    xtype: 'textfield',
                                    anchor: '80%',
                                    allowBlank: false,
                                    blankText: message.get('message.edit.noblank'),
                                    emptyText: message.get('message.combo.pleaseselect'),
                                    readOnly: true,
                                    maxLength: 128,
                                    listeners: {
                                        'render': {
                                            fn: function(){
                                                Ext.getCmp('bottomThrum').getEl().on('click', function(){
                                                	currentAomor = 'bottomThrum';
                                                    selectArmor(selectArmorCallback);
                                                }, this);
                                            },
                                            scope: this
                                        }
                                    }
                                },{
			                        id: 'sleevesThrumId',
			                        name: 'sleevesThrumId',
			                        xtype: 'hidden'
			                    },{
			                        id: 'sleevesThrumPhotoName',
			                        name: 'sleevesThrumPhotoName',
			                        xtype: 'hidden'
			                    },{
                                    name: 'sleevesThrumReference',
									id: 'sleevesThrum',
                                    fieldLabel:referenceMessage.get('ui.reference.sleevesthrum') + '&nbsp;&nbsp;&nbsp;&nbsp;<img id="sleevesThrumTip" src="../../images/icons/images.png"/>',
                                    xtype: 'textfield',
                                    anchor: '80%',
                                    allowBlank: false,
                                    emptyText: message.get('message.combo.pleaseselect'),
                                    readOnly: true,
                                    blankText: message.get('message.edit.noblank'),
                                    maxLength: 128,
                                    listeners: {
                                        'render': {
                                            fn: function(){
                                                Ext.getCmp('sleevesThrum').getEl().on('click', function(){
                                                	currentAomor = 'sleevesThrum';
                                                    selectArmor(selectArmorCallback);
                                                }, this);
                                            },
                                            scope: this
                                        }
                                    }
                                }]
                            }, {
                                columnWidth: .25,
                                layout: 'form',
                                labelWidth: 180,
                                items: [{
									xtype:'numberfield',
				                    fieldLabel: piMessage.get('ui.productidentification.densitycolumms') + '(/5 cm)',
				                    id: 'densityColumms1',
				                    name: 'densityColumms1',
				                    anchor:'90%',
									maxLength: 64,
									tabIndex: 1
								},{
									xtype:'numberfield',
				                    fieldLabel: piMessage.get('ui.productidentification.densitycolumms') + '(/5 cm)&nbsp;&nbsp;<img src="../../images/icons/paste_plain.png" style="cursor: hand;" onclick="copyDensity(2);">',
				                    id: 'densityColumms2',
				                    name: 'densityColumms2',
				                    anchor:'90%',
									maxLength: 64,
									tabIndex: 1
								},{
									xtype:'numberfield',
				                    fieldLabel: piMessage.get('ui.productidentification.densitycolumms') + '(/5 cm)&nbsp;&nbsp;<img src="../../images/icons/paste_plain.png" style="cursor: hand;" onclick="copyDensity(3);">',
				                    id: 'densityColumms3',
				                    name: 'densityColumms3',
				                    anchor:'90%',
									maxLength: 64,
									tabIndex: 1
								},{
									xtype:'numberfield',
				                    fieldLabel: piMessage.get('ui.productidentification.densitycolumms') + '(/5 cm)',
				                    id: 'densityColumms4',
				                    name: 'densityColumms4',
				                    anchor:'90%',
									maxLength: 64,
									tabIndex: 1
								},{
									xtype:'numberfield',
				                    fieldLabel: piMessage.get('ui.productidentification.densitycolumms') + '(/5 cm)&nbsp;&nbsp;<img src="../../images/icons/paste_plain.png" style="cursor: hand;" onclick="copyDensity(5);">',
				                    id: 'densityColumms5',
				                    name: 'densityColumms5',
				                    anchor:'90%',
									maxLength: 64,
									tabIndex: 1
								},{
									xtype:'numberfield',
				                    fieldLabel: piMessage.get('ui.productidentification.densitycolumms') + '(/5 cm)&nbsp;&nbsp;<img src="../../images/icons/paste_plain.png" style="cursor: hand;" onclick="copyDensity(6);">',
				                    id: 'densityColumms6',
				                    name: 'densityColumms6',
				                    anchor:'90%',
									maxLength: 64,
									tabIndex: 1
								}]
                            }, {
                                columnWidth: .25,
                                layout: 'form',
                                labelWidth: 180,
                                items: [{
									xtype:'numberfield',
				                    fieldLabel: piMessage.get('ui.productidentification.densityrows') + '(/5 cm)',
				                    id: 'densityRows1',
				                    name: 'densityRows1',
				                    anchor:'90%',
									maxLength: 64,
									tabIndex: 1
								},{
									xtype:'numberfield',
				                    fieldLabel: piMessage.get('ui.productidentification.densityrows') + '(/5 cm)',
				                    id: 'densityRows2',
				                    name: 'densityRows2',
				                    anchor:'90%',
									maxLength: 64,
									tabIndex: 1
								},{
									xtype:'numberfield',
				                    fieldLabel: piMessage.get('ui.productidentification.densityrows') + '(/5 cm)',
				                    id: 'densityRows3',
				                    name: 'densityRows3',
				                    anchor:'90%',
									maxLength: 64,
									tabIndex: 1
								},{
									xtype:'numberfield',
				                    fieldLabel: piMessage.get('ui.productidentification.densityrows') + '(/5 cm)',
				                    id: 'densityRows4',
				                    name: 'densityRows4',
				                    anchor:'90%',
									maxLength: 64,
									tabIndex: 1
								},{
									xtype:'numberfield',
				                    fieldLabel: piMessage.get('ui.productidentification.densityrows') + '(/5 cm)',
				                    id: 'densityRows5',
				                    name: 'densityRows5',
				                    anchor:'90%',
									maxLength: 64,
									tabIndex: 1
								},{
									xtype:'numberfield',
				                    fieldLabel: piMessage.get('ui.productidentification.densityrows') + '(/5 cm)',
				                    id: 'densityRows6',
				                    name: 'densityRows6',
				                    anchor:'90%',
									maxLength: 64,
									tabIndex: 1
								}]
                            }]
                        }]
                    }, {
                        xtype: 'fieldset',
                        collapsible: true,
                        title: piMessage.get('ui.productidentification.set3'),
                        autoHeight: true,
                        items: [{
                            layout: 'column',
                            items: [{
                                columnWidth: .33,
                                layout: 'form',
                                items: [{
									id: 'factoryNameCN',
                                    name: 'factoryNameCN',
                                    fieldLabel: fMessage.get('ui.factory.name'),
                                    xtype: 'textarea',
                                    anchor: '86%',
                                    allowBlank: false,
                                    blankText: message.get('message.edit.noblank'),
									emptyText: message.get('message.combo.pleaseselect'),
									readOnly: true,
                                    maxLength: 256,
									listeners: {
                                        'render': {
                                            fn: function(){
                                                Ext.getCmp('factoryNameCN').getEl().on('click', function(){
                                                    selectFactory(selectFactoryCallback, '02');
                                                }, this);
                                            },
                                            scope: this
                                        }
                                    }
                                },{
									id: 'factoryNameEN',
                                    name: 'factoryNameEN',
                                    fieldLabel: '',
                                    labelSeparator: '',
                                    xtype: 'textarea',
                                    anchor: '86%',
                                    allowBlank: false,
                                    blankText: message.get('message.edit.noblank'),
									emptyText: message.get('message.combo.pleaseselect'),
									readOnly: true,
                                    maxLength: 256
                                }]
                            }, {
                                columnWidth: .33,
                                layout: 'form',
                                items: [{
										id: 'isNeedle',
										inputValue: 'needle',
										name : 'equipment',
										disabled : true,
										fieldLabel: fMessage.get('ui.factory.equipment'),
										xtype: 'radio',
										boxLabel: fMessage.get('ui.factory.needle'),
										listeners: {
											check : {
												fn: function (radio, checked){
													if(checked){
														enableJauge(selectedFactory, 'isNeedle');
													}
												}
											}
										}
									},{
										id: 'isHand',
										inputValue: 'hand',
										name : 'equipment',
										fieldLabel: '',
										labelSeparator: '',
										xtype: 'radio',
										disabled : true,
										boxLabel: fMessage.get('ui.factory.hand'),
										listeners: {
											check : {
												fn: function (radio, checked){
													if(checked){
														enableJauge(selectedFactory, 'isHand');
													}
												}
											}
										}
									},{
										id: 'isIntarsiaHand',
										inputValue: 'intarsiahand',
										name : 'equipment',
										fieldLabel: '',
										labelSeparator: '',
										xtype: 'radio',
										disabled : true,
										boxLabel: fMessage.get('ui.factory.intarsiahand'),
										listeners: {
											check : {
												fn: function (radio, checked){
													if(checked){
														enableJauge(selectedFactory, 'isIntarsiaHand');
													}
												}
											}
										}
									},{
										id: 'isElectronic',
										inputValue: 'electronic',
										name : 'equipment',
										fieldLabel: '',
										labelSeparator: '',
										disabled : true,
										xtype: 'radio',
										boxLabel: fMessage.get('ui.factory.electronic'),
										listeners: {
											check : {
												fn: function (radio, checked){
													if(checked){
														enableJauge(selectedFactory, 'isElectronic');
													}
												}
											}
										}
									},{
										id: 'isEquipmentOther1',
										inputValue: 'equipmentother1',
										name : 'equipment',
										fieldLabel: '',
										labelSeparator: '',
										disabled : true,
										xtype: 'radio',
										boxLabel: fMessage.get('ui.factory.equipmentother') + '1',
										listeners: {
											check : {
												fn: function (radio, checked){
													if(checked){
														enableJauge(selectedFactory, 'isEquipmentOther1');
													}
												}
											}
										}
									},{
										id: 'isEquipmentOther2',
										inputValue: 'equipmentother2',
										name : 'equipment',
										fieldLabel: '',
										labelSeparator: '',
										disabled : true,
										xtype: 'radio',
										boxLabel: fMessage.get('ui.factory.equipmentother') + '2',
										listeners: {
											check : {
												fn: function (radio, checked){
													if(checked){
														enableJauge(selectedFactory, 'isEquipmentOther2');
													}
												}
											}
										}
									},{
										id: 'isEquipmentOther3',
										inputValue: 'equipmentother3',
										name : 'equipment',
										fieldLabel: '',
										labelSeparator: '',
										disabled : true,
										xtype: 'radio',
										boxLabel: fMessage.get('ui.factory.equipmentother') + '3',
										listeners: {
											check : {
												fn: function (radio, checked){
													if(checked){
														enableJauge(selectedFactory, 'isEquipmentOther3');
													}
												}
											}
										}
									}]
                            }, {
                                columnWidth: .33,
                                layout: 'form',
                                items: [{
									id: 'isJauge3',
									name: 'jauge',
									inputValue: '3',
									fieldLabel: '&nbsp;&nbsp;&nbsp;&nbsp;' + fMessage.get('ui.factory.jauge'),
									xtype: 'radio',
									disabled : true,
									boxLabel: 3
									
								},{
									id: 'isJauge5',
									name: 'jauge',
									inputValue: '5',
									fieldLabel: '',
									labelSeparator: '',
									xtype: 'radio',
									disabled : true,
									boxLabel: 5
								},{
									id: 'isJauge7',
									name: 'jauge',
									inputValue: '7',
									fieldLabel: '',
									labelSeparator: '',
									xtype: 'radio',
									disabled : true,
									boxLabel: 7
								},{
									id: 'isJauge9',
									name: 'jauge',
									inputValue: '9',
									fieldLabel: '',
									labelSeparator: '',
									xtype: 'radio',
									disabled : true,
									boxLabel: 9
								},{
									id: 'isJauge12',
									name: 'jauge',
									inputValue: '12',
									fieldLabel: '',
									labelSeparator: '',
									xtype: 'radio',
									disabled : true,
									boxLabel: 12
								},{
									id: 'isJauge14',
									name: 'jauge',
									inputValue: '14',
									fieldLabel: '',
									labelSeparator: '',
									xtype: 'radio',
									disabled : true,
									boxLabel: 14
								},{
									id: 'isJauge16',
									name: 'jauge',
									inputValue: '16',
									fieldLabel: '',
									labelSeparator: '',
									xtype: 'radio',
									disabled : true,
									boxLabel: 16
								},{
									id: 'isJauge18',
									name: 'jauge',
									inputValue: '18',
									fieldLabel: '',
									labelSeparator: '',
									xtype: 'radio',
									disabled : true,
									boxLabel: 18
								}]
                            }]
                        }]
                    }, {
                        xtype: 'fieldset',
                        collapsible: true,
                        title: piMessage.get('ui.productidentification.set4'),
                        autoHeight: true,
                        items: [{
                            layout: 'column',
                            items: [{
                                columnWidth: .33,
                                layout: 'form',
                                items: [{
									id: 'sketch1',
                                    name: 'sketch1',
                                    fieldLabel: piMessage.get('ui.productidentification.sketch') + '1&nbsp;&nbsp;<img qtip="' + message.get('message.edit.deleteimg') + '" src="../../images/icons/image_delete.png" onclick="javascript: removeSketch(\'isSketch1Deleted\');" style="cursor:hand;"/>',
                                    xtype: 'fileuploadfield',
                                    anchor: '80%',
                                    emptyText: message.get('message.edit.selectimage'),
                                    buttonCfg: {
                                        text: '',
                                        iconCls: 'uploadIcon'
                                    }
                                }, {
                                    fieldLabel: message.get('message.edit.descriptionfr') + '1',
                                    id: 'sketch1DescriptionFR',
                                    name: 'sketch1DescriptionFR',
                                    xtype: 'textarea',
                                    maxLength: 2048,
                                    width: '90%',
                                    maxLengthText: message.get('message.edit.toolong')
                                }, {
                                    fieldLabel: message.get('message.edit.descriptioncn') + '1',
                                    id: 'sketch1DescriptionCN',
                                    name: 'sketch1DescriptionCN',
                                    xtype: 'textarea',
                                    maxLength: 2048,
                                    width: '90%',
                                    maxLengthText: message.get('message.edit.toolong')
                                }, {
                                    fieldLabel: message.get('message.edit.descriptionen') + '1',
                                    id: 'sketch1DescriptionEN',
                                    name: 'sketch1DescriptionEN',
                                    xtype: 'textarea',
                                    maxLength: 2048,
                                    width: '90%',
                                    maxLengthText: message.get('message.edit.toolong')
                                }]
                            }, {
                                columnWidth: .33,
                                layout: 'form',
                                items: [{
									id: 'sketch2',
                                    name: 'sketch2',
                                    fieldLabel: piMessage.get('ui.productidentification.sketch') + '2&nbsp;&nbsp;<img qtip="' + message.get('message.edit.deleteimg') + '" src="../../images/icons/image_delete.png" onclick="javascript: removeSketch(\'isSketch2Deleted\');" style="cursor:hand;"/>',
                                    xtype: 'fileuploadfield',
                                    anchor: '80%',
									emptyText: message.get('message.edit.selectimage'),
                                    buttonCfg: {
                                        text: '',
                                        iconCls: 'uploadIcon'
                                    }
                                }, {
                                    fieldLabel: message.get('message.edit.descriptionfr') + '2',
                                    id: 'sketch2DescriptionFR',
                                    name: 'sketch2DescriptionFR',
                                    xtype: 'textarea',
                                    maxLength: 2048,
                                    width: '90%',
                                    maxLengthText: message.get('message.edit.toolong')
                                }, {
                                    fieldLabel: message.get('message.edit.descriptioncn') + '2',
                                    id: 'sketch2DescriptionCN',
                                    name: 'sketch2DescriptionCN',
                                    xtype: 'textarea',
                                    maxLength: 2048,
                                    width: '90%',
                                    maxLengthText: message.get('message.edit.toolong')
                                }, {
                                    fieldLabel: message.get('message.edit.descriptionen') + '2',
                                    id: 'sketch2DescriptionEN',
                                    name: 'sketch2DescriptionEN',
                                    xtype: 'textarea',
                                    maxLength: 2048,
                                    width: '90%',
                                    maxLengthText: message.get('message.edit.toolong')
                                }]
                            }, {
                                columnWidth: .33,
                                layout: 'form',
                                items: [{
									id: 'sketch3',
                                    name: 'sketch3',
                                    fieldLabel: piMessage.get('ui.productidentification.sketch') + '3&nbsp;&nbsp;<img qtip="' + message.get('message.edit.deleteimg') + '" src="../../images/icons/image_delete.png" onclick="javascript: removeSketch(\'isSketch3Deleted\');" style="cursor:hand;"/>',
                                    xtype: 'fileuploadfield',
                                    anchor: '80%',
									emptyText: message.get('message.edit.selectimage'),
                                    buttonCfg: {
                                        text: '',
                                        iconCls: 'uploadIcon'
                                    }
                                }, {
                                    fieldLabel: message.get('message.edit.descriptionfr') + '3',
                                    id: 'sketch3DescriptionFR',
                                    name: 'sketch3DescriptionFR',
                                    xtype: 'textarea',
                                    maxLength: 2048,
                                    width: '90%',
                                    maxLengthText: message.get('message.edit.toolong')
                                }, {
                                    fieldLabel: message.get('message.edit.descriptioncn') + '3',
                                    id: 'sketch3DescriptionCN',
                                    name: 'sketch3DescriptionCN',
                                    xtype: 'textarea',
                                    maxLength: 2048,
                                    width: '90%',
                                    maxLengthText: message.get('message.edit.toolong')
                                }, {
                                    fieldLabel: message.get('message.edit.descriptionen') + '3',
                                    id: 'sketch3DescriptionEN',
                                    name: 'sketch3DescriptionEN',
                                    xtype: 'textarea',
                                    maxLength: 2048,
                                    width: '90%',
                                    maxLengthText: message.get('message.edit.toolong')
                                }]
                            }]
                        },{
                            layout: 'column',
                            items: [{
                                columnWidth: .60,
                                layout: 'form',
                                items: [{
									id: 'sketch4',
                                    name: 'sketch4',
                                    fieldLabel: piMessage.get('ui.productidentification.sketch') + '4&nbsp;&nbsp;<img qtip="' + message.get('message.edit.deleteimg') + '" src="../../images/icons/image_delete.png" onclick="javascript: removeSketch(\'isSketch4Deleted\');" style="cursor:hand;"/>',
                                    xtype: 'fileuploadfield',
                                    anchor: '80%',
                                    emptyText: message.get('message.edit.selectimage'),
                                    buttonCfg: {
                                        text: '',
                                        iconCls: 'uploadIcon'
                                    }
                                }]
                            }]
                        }]
                    }],
                    
                    buttons: [{
                        text: message.get('message.edit.save'),
                        handler: function(){
                            if (productIdentificationForm.getForm().isValid()) {
                            
								//document.getElementsByName('ctProductFamily')[0].value = ctProductFamilyCombo.getValue();
								document.getElementsByName('ctDesignType')[0].value = ctDesignTypeCombo.getValue();
								document.getElementsByName('ctProductIdentificationStyle')[0].value = ctProductIdentificationStyleCombo.getValue();
                                document.getElementsByName('ctSeasonNumber')[0].value = ctSeasonNumberCombo.getValue();
                                //alert(ctVersionCombo.getValue());
                                //document.getElementsByName('ctCostumeCategory')[0].value = ctCostumeCategoryCombo.getValue();
                                //document.getElementsByName('ctMachineType')[0].value = ctMachineTypeCombo.getValue();
                                document.getElementsByName('ctCollarType')[0].value = ctCollarTypeCombo.getValue();
                                document.getElementsByName('ctVersion')[0].value = '' + ctVersionCombo.getValue();
                                productIdentificationForm.getForm().submit({
                                    method: 'post',
                                    success: function(form, action){
                                        messageTip.msg(message.get('message.tip'), message.get('message.edit.successful'));
                                        document.getElementById('sketch1-file').value = null;
                                        document.getElementById('sketch2-file').value = null;
                                        document.getElementById('sketch3-file').value = null;
                                        document.getElementById('sketch4-file').value = null;
                                        productIdentificationForm.getForm().reset();
                                    },
                                    failure: function(form, action){
                                        messageTip.msg(message.get('message.tip'), message.get('message.edit.unsuccessful'));
                                    }
                                });
                            }
                        }
                    },
                   /* {
                        text: message.get('message.edit.next'),
                        handler: function(){
                            if (productIdentificationForm.getForm().isValid()) {
                            
								document.getElementsByName('ctProductFamily')[0].value = ctProductFamilyCombo.getValue();
								document.getElementsByName('ctDesignType')[0].value = ctDesignTypeCombo.getValue();
                                document.getElementsByName('ctSeasonNumber')[0].value = ctSeasonNumberCombo.getValue();
								document.getElementsByName('ctVersion')[0].value = ctVersionCombo.getValue();
                                //document.getElementsByName('ctCostumeCategory')[0].value = ctCostumeCategoryCombo.getValue();
                                document.getElementsByName('ctMachineType')[0].value = ctMachineTypeCombo.getValue();
                                document.getElementsByName('customerId')[0].value = customerCombo.getValue();
                                document.getElementsByName('ctCollarType')[0].value = ctCollarTypeCombo.getValue();
                                
                                productIdentificationForm.getForm().submit({
                                    method: 'post',
                                    success: function(form, action){
                                        messageTip.msg(message.get('message.tip'), message.get('message.edit.successful'));
                                        productIdentificationForm.getForm().reset();
										setTimeout('window.location="product_measure_specification_item_edit.html?id=' + action.result.id + '&msId=' + action.result.msId + '"', 2000);
                                    },
                                    failure: function(form, action){
                                        messageTip.msg(message.get('message.tip'), message.get('message.edit.unsuccessful'));
                                    }
                                });
                            }
                        }
                    },*/
                     {
                        text: message.get('message.edit.reset'),
                        handler: function(){
                            productIdentificationForm.getForm().reset();
                        }
                    }, {
                        text: message.get('message.edit.cancel'),
                        handler: function(){
	                    	if(input == 'history'){
								if (startPage != null) {
	                                window.location = 'product_identification_history_list.html?startPage=' + startPage;
	                            }else {
	                                window.location = 'product_identification_history_list.html';
	                            }
	                            return;
							}
                            if (startPage != null) {
                                window.location = 'product_identification_list.html?startPage=' + startPage;
                            }
                            else {
                                window.location = 'product_identification_list.html';
                            }
                        }
                    }]
                });
                
                
                productIdentificationForm.render('productIdentificationForm');
                
                new Ext.Resizable('customImg', {
                    wrap: true,
                    pinned: true,
                    dynamic: true,
                    handles: 'all',
                    draggable: true
                });
                
                new Ext.Resizable('customImg1', {
                    wrap: true,
                    pinned: true,
                    dynamic: true,
                    handles: 'all',
                    draggable: true
                });
                
                var frontTip = new Ext.ToolTip({
			        target: 'frontTip',
			        html: '<img id="frontImg" src="../../_temp/noimage.gif" width="150px">',
			        title: referenceMessage.get('ui.reference.front'),
			        autoHide: true,
			        closable: true,
			        draggable:true
			    });
			    frontTip.on('show', function(){
			    	if(frontImg){
			    		document.getElementById('frontImg').src =  '../../_temp/' + frontImg;
			    	}
			    });
			    
			    var necklineThrumTip = new Ext.ToolTip({
			        target: 'necklineThrumTip',
			        html: '<img id="necklineThrumImg" src="../../_temp/noimage.gif" width="150px">',
			        title: referenceMessage.get('ui.reference.necklinethrum'),
			        autoHide: true,
			        closable: true,
			        draggable:true
			    });
			    necklineThrumTip.on('show', function(){
			    	if(necklineThrumImg){
			    		document.getElementById('necklineThrumImg').src =  '../../_temp/' + necklineThrumImg;
			    	}
			    });
			    
			    var backTip = new Ext.ToolTip({
			        target: 'backTip',
			        html: '<img id="backImg" src="../../_temp/noimage.gif" width="150px">',
			        title: referenceMessage.get('ui.reference.back'),
			        autoHide: true,
			        closable: true,
			        draggable:true
			    });
			    backTip.on('show', function(){
			    	if(backImg){
			    		document.getElementById('backImg').src =  '../../_temp/' + backImg;
			    	}
			    });
			    
			    var bottomThrumTip = new Ext.ToolTip({
			        target: 'bottomThrumTip',
			        html: '<img id="bottomThrumImg" src="../../_temp/noimage.gif" width="150px">',
			        title: referenceMessage.get('ui.reference.bottomthrum'),
			        autoHide: true,
			        closable: true,
			        draggable:true
			    });
			    bottomThrumTip.on('show', function(){
			    	if(bottomThrumImg){
			    		document.getElementById('bottomThrumImg').src =  '../../_temp/' + bottomThrumImg;
			    	}
			    });
			    
			    var sleevesThrumTip = new Ext.ToolTip({
			        target: 'sleevesThrumTip',
			        html: '<img id="sleevesThrumImg" src="../../_temp/noimage.gif" width="150px">',
			        title: referenceMessage.get('ui.reference.sleevesthrum'),
			        autoHide: true,
			        closable: true,
			        draggable:true
			    });
			    sleevesThrumTip.on('show', function(){
			    	if(sleevesThrumImg){
			    		document.getElementById('sleevesThrumImg').src =  '../../_temp/' + sleevesThrumImg;
			    	}
			    });
			    
			    var sleevesTip = new Ext.ToolTip({
			        target: 'sleevesTip',
			        html: '<img id="sleevesImg" src="../../_temp/noimage.gif" width="150px">',
			        title: referenceMessage.get('ui.reference.sleevesthrum'),
			        autoHide: true,
			        closable: true,
			        draggable:true
			    });
			    sleevesTip.on('show', function(){
			    	if(sleevesImg){
			    		document.getElementById('sleevesImg').src =  '../../_temp/' + sleevesImg;
			    	}
			    });
			    
			    
				
				new Ext.Resizable('customImg2', {
                    wrap: true,
                    pinned: true,
                    dynamic: true,
                    handles: 'all',
                    draggable: true
                });
               
                new Ext.Resizable('customImg3', {
                    wrap: true,
                    pinned: true,
                    dynamic: true,
                    handles: 'all',
                    draggable: true
                });
//				
//				new Ext.Resizable('customImg4', {
//                    wrap: true,
//                    pinned: true,
//                    dynamic: true,
//                    handles: 'all',
//                    draggable: true
//                });
				
				if (idValue != null) {
					document.getElementById('id').value = idValue;
					productIdentificationForm.getForm().load({
							url:'../../servlet/ProductIdentificationServlet?action=3&id=' + idValue, 
							waitMsg:Ext.LoadMask.prototype.msg, 
							success: function(form, action){
								loadOnSuccessful();
								ctCollarTypeCombo.fireEvent('select',ctCollarTypeCombo);
							}
					});
				}

				document.getElementById('customImgSpan').innerHTML = piMessage.get('ui.productidentification.sketch') + '1';
                document.getElementById('customImgSpan1').innerHTML = piMessage.get('ui.productidentification.sketch') + '2';
                document.getElementById('customImgSpan2').innerHTML = piMessage.get('ui.productidentification.sketch') + '3';
                document.getElementById('customImgSpan3').innerHTML = piMessage.get('ui.productidentification.sketch') + '4';
            });
            
            var loadOnSuccessful = function(){
            	document.getElementById('customImg').src =  '../../_temp/' + document.getElementById('sketch1Name').value;
				document.getElementById('customImg1').src =  '../../_temp/' + document.getElementById('sketch2Name').value;
				document.getElementById('customImg2').src =  '../../_temp/' + document.getElementById('sketch3Name').value;
				document.getElementById('customImg3').src =  '../../_temp/' + document.getElementById('sketch4Name').value;
				
				frontImg = Ext.getCmp('frontPhotoName').getValue();
				backImg = Ext.getCmp('backPhotoName').getValue();
				sleevesImg = Ext.getCmp('sleevesPhotoName').getValue();
				necklineThrumImg = Ext.getCmp('necklineThrumPhotoName').getValue();
				bottomThrumImg = Ext.getCmp('bottomThrumPhotoName').getValue();
				sleevesThrumImg = Ext.getCmp('sleevesThrumPhotoName').getValue();
				
				if(Ext.getCmp('isHand').getValue()) Ext.getCmp('isHand').enable();
				if(Ext.getCmp('isIntarsiaHand').getValue()) Ext.getCmp('isIntarsiaHand').enable();
				if(Ext.getCmp('isElectronic').getValue()) Ext.getCmp('isElectronic').enable();
				if(Ext.getCmp('isEquipmentOther1').getValue()) Ext.getCmp('isEquipmentOther1').enable();
				if(Ext.getCmp('isEquipmentOther2').getValue()) Ext.getCmp('isEquipmentOther2').enable();
				if(Ext.getCmp('isEquipmentOther3').getValue()) Ext.getCmp('isEquipmentOther3').enable();
				
				if(Ext.getCmp('isJauge3').getValue()) Ext.getCmp('isJauge3').enable();
				if(Ext.getCmp('isJauge5').getValue()) Ext.getCmp('isJauge5').enable();
				if(Ext.getCmp('isJauge7').getValue()) Ext.getCmp('isJauge7').enable();
				if(Ext.getCmp('isJauge9').getValue()) Ext.getCmp('isJauge9').enable();
				if(Ext.getCmp('isJauge12').getValue()) Ext.getCmp('isJauge12').enable();
				if(Ext.getCmp('isJauge14').getValue()) Ext.getCmp('isJauge14').enable();
				if(Ext.getCmp('isJauge16').getValue()) Ext.getCmp('isJauge16').enable();
				if(Ext.getCmp('isJauge18').getValue()) Ext.getCmp('isJauge18').enable();
            }

            var selectSimilaryPI = function(){
            	/*Modify on 2011-02-10
            	if(Ext.getCmp('referenceAs').getValue() == ''){
            		messageTip.msg(message.get('message.tip'), piMessage.get('ui.productidentification.referenceas') + '. ' + message.get('message.edit.noblank'));
                	return;
                }
                selectProductIdentification(selectProductIdentificationCallBack, null, null, Ext.getCmp('referenceAs').getValue(), "1");*/
                //alert(ctCollarTypeCombo.getValue());
                if(ctCollarTypeCombo.getValue() == '' || ctCollarTypeCombo.getValue() == null){
                	messageTip.msg(message.get('message.tip'), piMessage.get('ui.productidentification.style') + '. ' + message.get('message.edit.noblank'));
                	return;
                }
                selectProductIdentification(selectProductIdentificationCallBack, ctCollarTypeCombo.getValue(), null, null, "1");
            }
        </script>
</head>
<body>
<div id="productIdentificationForm"></div>
<div style="position: absolute; left: 10%;margin-top: 10px;">
	<p id="customImgSpan" style="text-align: center;"></p>
	<img id="customImg" src="../../_temp/noimage.gif"
	style="width: 250px;" onclick="openImageViewer(this.src);"/>
</div>

<div style="position: absolute; left: 40%;margin-top: 10px;">
	<p id="customImgSpan1" style="text-align: center;"></p>
	<img id="customImg1" src="../../_temp/noimage.gif"
	style="width: 250px;" onclick="openImageViewer(this.src);"/>
</div>

<div style="position: absolute; left: 70%;margin-top: 10px;">
	<p id="customImgSpan2" style="text-align: center;"></p>
	<img id="customImg2" src="../../_temp/noimage.gif" style="width: 250px;" onclick="openImageViewer(this.src);"/>
</div>
<div style="position: absolute; left: 10%;margin-top: 300px;">
	<p id="customImgSpan3" style="text-align: center;"></p>
	<img id="customImg3" src="../../_temp/noimage.gif"
	style="width: 250px;" onclick="openImageViewer(this.src);"/>
</div>
<!--
		<img id="customImg2" src="../../_temp/noimage.gif" style="position:absolute;left: 40%;width: 250px;"/>
		<img id="customImg3" src="../../_temp/noimage.gif" style="position:absolute;left: 60%;width: 250px;"/>
		<img id="customImg4" src="../../_temp/noimage.gif" style="position:absolute;left: 80%;width: 250px;"/>
		-->
</body>
</html>